var root = ui("$");
var labelNum0 = ui("labelNum0");
var labelNum1 = ui("labelNum1");
var labelNum2 = ui("labelNum2");
var labelNum3 = ui("labelNum3");
root.setMapping({
	"img0.source" : "img0",
    "label0.text": "label0",
    "labelNum0.text": "labelNum0",
	"img1.source" : "img1",
    "label1.text": "label1",
    "labelNum1.text": "labelNum1",
    "img2.source" : "img2",
    "label2.text": "label2",
    "labelNum2.text": "labelNum2",
    "img3.source" : "img3",
    "label3.text": "label3",
    "labelNum3.text": "labelNum3"
});

root.on("dataRefreshed", function(){
	if(labelNum0.text>0){
		labelNum0.visible = true;
	}else{
		labelNum0.visible = false;
	}
	if(labelNum1.text>0){
		labelNum1.visible = true;
	}else{
		labelNum1.visible = false;
	}
	if(labelNum2.text>0){
		labelNum2.visible = true;
	}else{
		labelNum2.visible = false;
	}
	if(labelNum3.text>0){
		labelNum3.visible = true;
	}else{
		labelNum3.visible = false;
	}
});